Skip to content
Merged

Dev #16

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Handle Release

on:
release:
types: [created]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
jobs:
generate:
name: Create release-artifacts
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
repository-projects: write
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Generate the artifacts
uses: Vba-actions/build-excel-addin@dev
- name: Upload PDF file
uses: actions/upload-artifact@v7
with:
name: Addin
path: Addin.xlam
17 changes: 14 additions & 3 deletions src/ClassModules/DrupalDatabase.cls
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ End Sub
' Get the children of an entity from a one-to-many relationship
'
' Returns:
' A copy of the structure
' An array of children entities
Public Function GetChildren(ByVal oEntity As iDrupalEntity, ByVal oField As iDrupalEntity) As iDrupalEntity()
Dim sBundle As String
sBundle = oEntity.Table
Expand Down Expand Up @@ -294,9 +294,17 @@ Public Sub Update(oEntity As iDrupalEntity)
MySQLDatabase.Execute MyUpdate
End Sub

'Create a object with values from the database, using a primary key
' Sub: CreateFromId
' Create an object with values from the database, using a primary key
'
' Parameters:
' oEntity - The labeled entity to populate
' lId - The promary Key ID to use
Public Sub CreateFromId(ByRef oEntity As iDrupalEntity, lId As Long)
Dim sSQL As SQLSelect
Dim sSql As SQLSelect
Dim ArrayOfValues As Variant
Dim FieldList As Variant
Dim numfields As Integer
Set sSQL = Create_SQLSelect
sSQL.Fields = GetFieldNames(oEntity.GetFields)
sSQL.Table = oEntity.Table
Expand All @@ -308,6 +316,9 @@ Public Sub CreateFromId(ByRef oEntity As iDrupalEntity, lId As Long)
Dim Item As DrupalField
For counter = 0 To numfields
Set Item = FieldList(counter)
If IsNull(ArrayOfValues(counter, 0)) Then
ArrayOfValues(counter, 0) = ""
End If
Item.Value = ArrayOfValues(counter, 0)
Next counter
End Sub
Expand Down
3 changes: 3 additions & 0 deletions src/ClassModules/iDrupalEntity.cls
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
' Interface: iDrupalEntity
' The common interface for Drupal Entities

Public Property Get Table()

End Property
Expand Down
Loading